import request from '@/utils/request';

// 得到基金总体信息
export async function getFundInfo(params) {
  return request(`/fss/FundMail/GetFundInfo`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(params),
  });
}

// 得到2号基金股票持仓信息
export async function getFundCodePosition(params) {
  return request(`/fss/FundMail/GetFundCodePosition`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(params),
  });
}

// 得到2号基金期权持仓信息
export async function getFundOptionPositionTwo(params) {
  return request(`/fss/FundMail/GetFundOptionPosition2`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(params),
  });
}

// 得到4号基金期权持仓信息
export async function getFundOptionPositionFour(params) {
  return request(`/fss/FundMail/GetFundOptionPosition4`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(params),
  });
}

// 得到日期列表
export async function getDateList(params) {
  return request(`/fss/FundMail/GetDateList`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(params),
  });
}

// 得到2号基金净值走势图
export async function getFundBaseValue2(params) {
  return request(`/fss/FundMail/GetFundBaseValue2`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(params),
  });
}

// 得到4号基金净值走势图
export async function getFundBaseValue4(params) {
  return request(`/fss/FundMail/GetFundBaseValue4`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(params),
  });
}

// 发送邮件
export async function sendHtmlWithAtc(params) {
  return request(`/fss/CxMail/sendHtml`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify(params),
  });
}
